import 'package:comics/router/router.dart' as router;
import 'package:comics/store/store.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:flutter/rendering.dart';

void main() {
  debugPaintSizeEnabled = false;
  runApp(const ComicsApp());
}

class ComicsApp extends StatelessWidget {
  const ComicsApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: [
        ChangeNotifierProvider(create: (_) => Store())
      ],
      child: MaterialApp.router(
        title: '漫画',
        theme: ThemeData(
          primarySwatch: Colors.blue,
          brightness: Brightness.light,
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        routerConfig: router.router,
        debugShowCheckedModeBanner: false,
      )
    );
  }
}